import Vue from 'vue'
import Element from 'element-ui'
import http from '@/utils/http'
import Cookies from '@/utils/cookies'
import i18n from '@/lang'
import store from '@/store'
import Index from './system.vue'
import router from './router'

Vue.prototype.$http = http

Vue.use(Element)

Vue.use(Element, {
  size: Cookies.get('size') || 'medium', // set element-ui default size
  i18n: (key, value) => i18n.t(key, value)
})

Vue.config.productionTip = false

Vue.prototype.$cookies = Cookies

/* eslint-disable no-new */
new Vue({
  el: '#app',
  router,
  store,
  i18n,
  render: h => h(Index)
})
